package JDK8;

import java.util.function.Function;

public class FunctionDemo {
    public static void main(String[] args) {
        int lenght=method((str)->str.length());
        System.out.println(lenght);
    }

    public static int method(Function<String,Integer> function){
        return function.apply("abc");
    }
}
